1. Technical Field
The invention is related to automatic texture mapping, and in particular, to a system and method for computing generalized displacement maps (GDM) from arbitrary mesostructure geometries for use in real-time rendering of arbitrary non-height-field mesostructures for open or closed surfaces of arbitrary geometry.
2. Related Art
Fine scale surface geometries, known as mesostructures, are an integral component in creating a realistic appearance for many real-world materials and objects. Computer rendering of such mesostructures provides not only fine resolution form to a surface, but also rich visual details such as fine-scale shading, shadows, occlusions and silhouettes. To enhance the realism of synthesized images, much attention has been focused on efficient and comprehensive methods for rendering mesostructures and their detailed appearance features.
Two of the most common approaches to mesostructure rendering include mapping images onto a surface and mapping geometry onto a surface. For example, conventional bidirectional texture functions (BTFs) record images of a mesostructure sample under different lighting and viewing directions, and then map the mesostructure sample to a target geometry. Unfortunately, because BTFs are merely 2-D images of mesostructure samples, those samples do not typically contain any 3-D geometric information. Consequently, silhouettes and the effects of surface curvature cannot typically be realistically rendered.
Some of the problems existing with the use of conventional BTF schemes have been addressed by first mapping mesostructure geometry onto a surface to form a highly detailed object model. The two dimensional mesostructure images are then mapped to the mesostructure geometry which has been mapped onto the surface to be textured. Such techniques have been used with conventional displacement maps and volumetric textures to render highly detailed visual effects of mesostructures. Unfortunately, because such models tend to be highly detailed, mapping mesostructures to such models is typically very computationally expensive. Further, conventional texture synthesis using displacement maps typically use only one offset value per texel. Consequently, such techniques are typically unable to handle arbitrary non-height-field mesostructures as discussed below.
The problem of high computational overhead when dealing with mapped mesostructure geometry in object space has been at least partially addressed by conventional schemes which pre-compute the visibility of mesostructure points and stores it in texture space. This technique has been referred to as “view-dependent displacement mapping,” or simply as VDM. With the pre-computed mesostructure points, VDM has been shown to be capable of achieving real-time rendering of highly detailed mesostructure visual effects, including silhouettes.
Unfortunately, conventional VDM schemes have at least two significant drawbacks. First, VDM is applicable to height-field geometry on closed surfaces, and provides poor quality results, at best, on open surfaces. Second, due to a large computational overhead, VDM can be practically pre-computed for only a limited class of surface shapes, such as those having a single surface curvature parameter. As a result, the pre-computed VDM lacks the specificity to accurately represent surfaces with curvature variations and texture warping. As a result, VDM textured surfaces can often exhibit significant texture distortions in the synthesized textures.
Other conventional BTF schemes for mesostructure rendering include the use of polynomial texture maps which represent the mesostructure appearance of each surface point under different lighting directions by fitting a biquadric polynomial. Unfortunately, for non-diffuse surfaces, this approach models only a fixed viewpoint. Recently, another conventional BTF-based scheme integrated the BTF with a pre-computed radiance transfer of macro-scale geometry, and then rendered bi-scale lighting effects in real time. However, although these image-based representations are capable of capturing the true appearances of a general mesostructure sample, the 2-D geometric structure inherent in simple images of mesostructures precludes the rendering of mesostructure silhouettes. Therefore, most prior techniques assume that mesostructures have the form of height fields on a mesh, which is considered to be a 2½ D representation.
Other conventional schemes have addressed rendering mesostructures that have height field geometry. Typically, such schemes are referred to, or are related to, “bump mapping.” Such schemes offer an efficient approach to texturing mesostructures with a height-field geometry. Unfortunately, these schemes do not account for silhouettes. On the other hand, silhouettes can be rendered by displacement maps which explicitly model the geometric details of height fields. However, while techniques based on height field geometries benefit from relative ease in processing, they typically lack the generality to describe a range of surface geometries that includes weave patterns and slanted protrusions.
Some of the problems described above have been addressed by a number of schemes which use “volumetric textures” to provide a general 3D representation of mesostructure as volumetric data sampled on 3D regular grids. Traditionally, volumetric textures are rendered by tracing rays through a shell volume mapped on a surface. Unfortunately, such methods are computationally expensive and do not typically translate well to real-time applications.
A number of conventional schemes have improved on conventional volumetric texture rendering approaches by using a slice-based technique to improve overall performance. In general, such slice-based volumetric texture rendering schemes operate by rendering a volume prism extruded from each triangle of the 3D texture as a stack of axis-aligned textured slices.
For example, one conventional scheme uses a set of slices parallel to the projection plane to render the shell volume. Similarly, another related scheme is capable of mapping volumetric fur on a surface by rendering the fur as concentric layers from the skin outwards. In addition, this scheme also reduces visible artifacts by using extruded fins from triangle edges near the silhouette. Yet another related scheme applies a pre-computed visibility map to render shadowing effects of thin knitwear.
Unfortunately, in each of these slice-based methods, the number of slices used for each triangle increases with volumetric resolution. As a result, the computational overhead necessary for rendering such textures is further magnified when sophisticated per-pixel shading is incorporated. As a result, such schemes do not appear to be capable of rendering volumetric textures with global illumination in real-time using conventional computing techniques.
Related schemes have attempted to provide for rapid software rendering by using view-dependent distance data in volumes to accelerate ray tracing. For example, one conventional scheme uses ray tracing in texture space to map mesostructures onto base geometry. This scheme also uses a special data structure to further accelerate the software rendering. A related scheme pre-computes visibility information and then reuses that visibility information for shadow computation and indirect illumination. However, the problem with rendering of silhouettes is not adequately addressed by such schemes so as to provide for real-time rendering.
Therefore, what is needed is a system and method that is capable of rendering of general non-height-field mesostructures on both open and closed surfaces in real-time. It should also be noted that any height-field mesostructure can be represented as a non-height-field mesostructure. Further, such a system and method should reduce the texture distortions observed in conventional rendering schemes. Such a system and method should also be capable of rendering both silhouettes and shadows in real time. In addition, such a system and method should be capable of rendering such mesostructures in real-time while using either local or global illumination. Finally, what is needed is a system and method that provides the above noted capabilities while simultaneously reducing computational overhead so as to provide real-time rendering of highly detailed mesostructures for open or closed surfaces of arbitrary geometry.